-
-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): Ensure that Ghost was started #612
Conversation
lib/commands/run.js
Outdated
instance.process.error(message.error); | ||
// Ghost error log happens AFTER this event | ||
// REMOVE WHEN ghost is released and we bump the cli engine? | ||
setTimeout(() => { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
lib/commands/start.js
Outdated
}; | ||
|
||
return this.ui.run(start, 'Starting Ghost', runOptions).then(() => { | ||
// @TODO: shouldn't this happen before start? |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
test/unit/process-manager-spec.js
Outdated
const ProcessManager = require('../../lib/process-manager'); | ||
|
||
describe('Unit: Process Manager', function () { | ||
let sandbox; |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
079b2a5
to
1ed5c93
Compare
closes TryGhost#472 - added port polling utility - general process manager class offers `ensureStarted` function - systemd extension makes use of `ensureStarted`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine other than a couple of small things.
lib/process-manager.js
Outdated
* @returns {Promise<any>} | ||
*/ | ||
ensureStarted(options) { | ||
options = merge({ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
lib/utils/port-polling.js
Outdated
const errors = require('../errors'); | ||
|
||
module.exports = function portPolling(options) { | ||
options = merge({ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
* | ||
* @returns {Promise<any>} | ||
*/ | ||
ensureStarted(options) { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
tested this and it works 👍 just need the above changes fixed and this is good to go. |
@acburdine cool 👍 will push your suggestions |
Pushed 2 commits 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
closes #472
ensureStarted
functionensureStarted